﻿#if !NETCOREAPP
using GameFramework.Network.MessagePack;
using GameFramework.Request;
#endif
using GameFramework.Reference;
using MessagePack;

namespace Server.Proto
{
    /// <summary>
    /// 角色上线信息推送
    /// </summary>
    [MessagePackObject(true)]
    public sealed class RoleInfoNotify : Message
    {
        [IgnoreMember]
        public const int RouteKey = (int)RouteDefine.RoleInfoNotify;

        [IgnoreMember]
        public override int Route => RouteKey;
        
        /// <summary>
        /// 基础信息
        /// </summary>
        public RoleBasic Basic { get; set; }
        
        /// <summary>
        /// 背包信息
        /// </summary>
        public RoleBag Bag { get; set; }

        public override void OnRecycle()
        {
            base.OnRecycle();
            Basic?.Recycle();
            Basic = null;
            Bag?.Recycle();
            Bag = null;
        }
    }
}